package ouisseuk.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
public class Release {

	private List<String> artists = new ArrayList<String>();
	private String title;
	private List<String> labels = new ArrayList<String>();

	private String country;
	private String released;
	private List<Image> images = new ArrayList<Image>();
	private List<Track> trackList = new ArrayList<Track>();

	public List<String> getArtists() {
		return artists;
	}

	public boolean addArtist(String artist) {
		return artists.add(artist);
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public List<String> getLabels() {
		return labels;
	}

	public boolean addLabel(String label) {
		return labels.add(label);
	}

	public String getLabelsAsString() {
		String res = "";
		Iterator<String> it = labels.iterator();
		while (it.hasNext()) {
			String s = it.next();
			res += s;
			if (it.hasNext())
				res += ", ";
		}
		return res;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getReleased() {
		return released;
	}

	public void setReleased(String released) {
		this.released = released;
	}

	public List<Image> getImages() {
		return images;
	}

	public boolean addImage(Image smallImage) {
		return images.add(smallImage);
	}

	public List<Track> getTrackList() {
		return trackList;
	}

	public boolean addTrack(Track track) {
		return trackList.add(track);
	}

}
